import jsonp from 'common/js/jsonp'
import {commonParams, options} from './config'

export function getToplist(){
    const url='api/v8/fcg-bin/fcg_myqq_toplist.fcg'
    
    const data= Object.assign({}, commonParams,{
        paltform: 'h5',
        needNewCode: 1
    })

    return jsonp(url,data,options)
}

export function getMusicList(topid) {
    const url = "api/v8/fcg-bin/fcg_v8_toplist_cp.fcg"

    const data = Object.assign({}, commonParams, {
             page: 'detail',
             type: 'top',
             tpl: 3,
             platform: 'h5',
             needNewcode: 1,
             topid
    })

    return jsonp(url, data, options)
}